electricities = []
for i in range(1, 4):
    while True:
        try:
            data = input(f"每行输入两个数字，输入三次，用空格分隔：")
            power, hours = map(float, data.split())
            if len(data.split()) != 2:
                raise ValueError("输入的数字数量必须为两个。")
            consumption = power * hours / 1000
            electricities.append(consumption)
            break
        except ValueError as e:
            print(f"输入错误: {e}，请重新输入。")

print("\n三个人的每月用电量如下：")
for idx, value in enumerate(electricities, 1):
    print(f"第{idx}个人的用电量：{value:.2f} kWh")